package edu.cuit.project.dao;

import edu.cuit.project.factory.HibernateSessionFactory;

import org.hibernate.FlushMode;
import org.hibernate.Session;


/**
 * Data access object (DAO) for domain model
 * @author MyEclipse Persistence Tools
 */
public class BaseHibernateDAO<T> implements IBaseHibernateDAO {
	
	public Session getSession() {
		Session session= HibernateSessionFactory.getSession();
		
		return HibernateSessionFactory.getSession();
	}
	
	public void sava(T t){
		getSession().beginTransaction();
		getSession().save(t);
		getSession().beginTransaction().commit();
		
	}
	
}